package com.dfiov.cloud.msmtools.enums;


public enum VehicleTypeEnum {

    USER(1, "用户"),

    TEST(2, "试乘试驾"),

    VIEW(3, "展车"),

    INNER_TEST(4, "内部测试"),

    MEDIEA(5, "媒体")
    ;

    private Integer code;

    private String desc;

    public static String getDescByCode(Integer code) {

        if(code == null) {
            return null;
        }
        for (VehicleTypeEnum statusEnum : values()) {
            if(statusEnum.code == code) {
                return statusEnum.desc;
            }
        }
        return null;
    }

    private VehicleTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
